/**
 * 
 */
package lt.vin.exaatto.client.events;

import lt.vin.exaatto.shared.Chat;

import com.google.gwt.event.shared.GwtEvent;

/**
 * @author Vincentas
 *
 */
public class MemberAddedEvent extends GwtEvent<MemberAddedHandler> {

	private final String member;
	
	private final Chat chat;
	
	public MemberAddedEvent(Chat chat, String member) {
		this.chat = chat;
		this.member = member;
	}
	
	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<MemberAddedHandler> getAssociatedType() {
		return MemberAddedHandler.type;
	}

	@Override
	protected void dispatch(MemberAddedHandler handler) {
		handler.newMember(chat, member);
	}
}
